From 787e62db1e34782b37613d204a305ae602f3663e Mon Sep 17 00:00:00 2001 From: robertl Date: Thu, 17 Jan 2008 02:26:00 +0000 Subject: [PATCH] Hardcap the number of Meridian/Explorist waypoints to 500. --- magproto.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/magproto.c b/magproto.c index e01f25fe7..44ae86fde 100644 --- a/magproto.c +++ b/magproto.c @@ -1,7 +1,7 @@ /* Communicate Thales/Magellan serial protocol. - Copyright (C) 2002, 2003, 2004, 2005, 2006 Robert Lipe, robertlipe@usa.net + Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008 Robert Lipe, robertlipe@usa.net This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -805,6 +805,10 @@ mag_wr_init_common(const char *portname) bitrate=atoi(bs); } + if (waypt_count() > 500) { + fatal(MYNAME ": Meridian/Explorist does not support more than 500 waypoints in one file. Only\n200 waypoints may have comments.\nDecrease the number of waypoints sent.\n"); + } + if (cmts) { wptcmtcnt_max = atoi(cmts); } else { -- 2.30.2